﻿-- =============================================
-- Script Template
-- =============================================
USE [actuals]
GO
/****** Object:  StoredProcedure [dbo].[usp_GetTeamMember]    Script Date: 10/01/2011 20:00:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create procedure [dbo].[usp_GetTeamMember]
@TeamId as int


as

select * from TblTeamMembers where TeamId=@TeamId
GO
/****** Object:  StoredProcedure [dbo].[usp_GetTasks]    Script Date: 10/01/2011 20:00:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[usp_GetTasks]
@ProjectId as int,
@ReleaseId as int

as

select * from TblTasks where ProjectId=@ProjectId and ReleaseId = @ReleaseId
GO
/****** Object:  StoredProcedure [dbo].[usp_GetRelease]    Script Date: 10/01/2011 20:00:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[usp_GetRelease]
@ProjectId as int,
@ReleaseId as int

as

select * from TblRelease where ProjectId=@ProjectId and ReleaseId = @ReleaseId
GO
/****** Object:  StoredProcedure [dbo].[usp_GetPublicHolidays]    Script Date: 10/01/2011 20:00:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[usp_GetPublicHolidays]
@FromDate as DateTime,
@ToDate as DateTime


as

select * from TblPublicHolidays where HolidayDate in (@FromDate,@ToDate)
GO
/****** Object:  StoredProcedure [dbo].[usp_GetPublicHoliday]    Script Date: 10/01/2011 20:00:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[usp_GetPublicHoliday]

@FromDate as DateTime,
@ToDate as DateTime
as

select * from TblPublicHolidays where 
 HolidayDate >= @FromDate and
HolidayDate <= @ToDate

/*
usp_GetActuals 1,1,'10/01/2011','10/01/2011'

select * from TblActuals
*/
GO
/****** Object:  StoredProcedure [dbo].[usp_GetProject]    Script Date: 10/01/2011 20:00:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
Create procedure [dbo].[usp_GetProject]
@ProjectId as int


as

select * from TblProject where ProjectId=@ProjectId
GO
/****** Object:  StoredProcedure [dbo].[usp_GetEmployeeLeave]    Script Date: 10/01/2011 20:00:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[usp_GetEmployeeLeave]
@FromDate as DateTime,
@ToDate as DateTime
as

select * from TblEmployeeLeaves  where 
 Leave >= @FromDate and
Leave <= @ToDate

/*
usp_GetActuals 1,1,'10/01/2011','10/01/2011'

select * from TblActuals
*/
GO
/****** Object:  StoredProcedure [dbo].[usp_GetActuals]    Script Date: 10/01/2011 20:00:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE procedure [dbo].[usp_GetActuals]
@ProjectId as int,
@ReleaseId as int,
@FromDate as DateTime,
@ToDate as DateTime
as

select * from TblActuals where 
ProjectId=@ProjectId and ReleaseId = @ReleaseId 
and actualdate >= @FromDate 
and actualdate <= @ToDate

/*
usp_GetActuals 1,1,'10/01/2011','10/01/2011'

select * from TblActuals
*/
GO
